package com.wuliupai.delivery.wuliupaidelivery.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Class:计算运费
 * Created by KANG on 2016/12/7  14:00.
 * Email:khl8912@126.com
 */

public class CalculateFreightBean extends BaseBean implements Parcelable {
    private String goodsWeight;//货物重量
    private String goodsVolume;//货物体积
    private String actualDistance;//实际运输距离
    private String calculateType;

//    private String selfPickUp;// 自提    0不自提1自提
//    private String selfSend;// 自送    0不自送1自送
    private String selfPickUpFreight;// 自提费
    private String selfSendFreight;// 自送费

    private String startProvince;//出发地省
    private String startCity;//出发地市
    private String startArea;//出发地县
    private String startAddress;//出发地详细地址

    private String endProvince;//目的地省
    private String endCity;//目的地市
    private String endArea;//目的地县
    private String endAddress;//目的地详细地址

    /**
     * 折扣信息
     */
    private List<String[]> discountInfo;

    /**
     * 运输费用
     */
    private String baseFreight;

    /**
     * 应付总额
     */
    private String freight;

    public CalculateFreightBean() {

    }


    /**
     * 计算运费
     *
     * @param goodsWeight
     * @param goodsVolume
     * @param calculateType
     * @param startProvince
     * @param startCity
     * @param startArea
     * @param startAddress
     * @param endProvince
     * @param endCity
     * @param endArea
     * @param endAddress
     * @param selfSend
     * @param selfPickUp
     */
    public CalculateFreightBean(String goodsWeight, String goodsVolume, String calculateType,
                                String startProvince, String startCity, String startArea, String startAddress,
                                String endProvince, String endCity, String endArea, String endAddress,
                                String selfSend, String selfPickUp) {
        this.goodsWeight = goodsWeight;
        this.goodsVolume = goodsVolume;
        this.calculateType = calculateType;
        this.startProvince = startProvince;
        this.startCity = startCity;
        this.startArea = startArea;
        this.startAddress = startAddress;
        this.endProvince = endProvince;
        this.endCity = endCity;
        this.endArea = endArea;
        this.endAddress = endAddress;
        this.selfSendFreight = selfSend;
        this.selfPickUpFreight = selfPickUp;
    }

    public String getSelfPickUpFreight() {
        return selfPickUpFreight;
    }

    public void setSelfPickUpFreight(String selfPickUpFreight) {
        this.selfPickUpFreight = selfPickUpFreight;
    }

    public String getSelfSendFreight() {
        return selfSendFreight;
    }

    public void setSelfSendFreight(String selfSendFreight) {
        this.selfSendFreight = selfSendFreight;
    }

    public String getGoodsWeight() {
        return goodsWeight;
    }

    public void setGoodsWeight(String goodsWeight) {
        this.goodsWeight = goodsWeight;
    }

    public String getActualDistance() {
        return actualDistance;
    }

    public void setActualDistance(String actualDistance) {
        this.actualDistance = actualDistance;
    }

    public String getGoodsVolume() {
        return goodsVolume;
    }

    public void setGoodsVolume(String goodsVolume) {
        this.goodsVolume = goodsVolume;
    }

    public String getFreight() {
        return freight;
    }

    public void setFreight(String freight) {
        this.freight = freight;
    }

    public String getCalculateType() {
        return calculateType;
    }

    public void setCalculateType(String calculateType) {
        this.calculateType = calculateType;
    }


    public List<String[]> getDiscountInfo() {
        return discountInfo;
    }

    public void setDiscountInfo(List<String[]> discountInfo) {
        this.discountInfo = discountInfo;
    }

    public String getBaseFreight() {
        return baseFreight;
    }

    public void setBaseFreight(String baseFreight) {
        this.baseFreight = baseFreight;
    }

//    public String getSelfPickUp() {
//        return selfPickUp;
//    }
//
//    public void setSelfPickUp(String selfPickUp) {
//        this.selfPickUp = selfPickUp;
//    }
//
//    public String getSelfSend() {
//        return selfSend;
//    }
//
//    public void setSelfSend(String selfSend) {
//        this.selfSend = selfSend;
//    }


    public String getStartProvince() {
        return startProvince;
    }

    public void setStartProvince(String startProvince) {
        this.startProvince = startProvince;
    }

    public String getStartCity() {
        return startCity;
    }

    public void setStartCity(String startCity) {
        this.startCity = startCity;
    }

    public String getStartArea() {
        return startArea;
    }

    public void setStartArea(String startArea) {
        this.startArea = startArea;
    }

    public String getStartAddress() {
        return startAddress;
    }

    public void setStartAddress(String startAddress) {
        this.startAddress = startAddress;
    }

    public String getEndProvince() {
        return endProvince;
    }

    public void setEndProvince(String endProvince) {
        this.endProvince = endProvince;
    }

    public String getEndCity() {
        return endCity;
    }

    public void setEndCity(String endCity) {
        this.endCity = endCity;
    }

    public String getEndArea() {
        return endArea;
    }

    public void setEndArea(String endArea) {
        this.endArea = endArea;
    }

    public String getEndAddress() {
        return endAddress;
    }

    public void setEndAddress(String endAddress) {
        this.endAddress = endAddress;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.goodsWeight);
        dest.writeString(this.goodsVolume);
        dest.writeString(this.actualDistance);
        dest.writeString(this.calculateType);
//        dest.writeString(this.selfPickUp);
//        dest.writeString(this.selfSend);
        dest.writeString(this.selfPickUpFreight);
        dest.writeString(this.selfSendFreight);
        dest.writeString(this.startProvince);
        dest.writeString(this.startCity);
        dest.writeString(this.startArea);
        dest.writeString(this.startAddress);
        dest.writeString(this.endProvince);
        dest.writeString(this.endCity);
        dest.writeString(this.endArea);
        dest.writeString(this.endAddress);
        dest.writeList(this.discountInfo);
        dest.writeString(this.baseFreight);
        dest.writeString(this.freight);
    }

    protected CalculateFreightBean(Parcel in) {
        this.goodsWeight = in.readString();
        this.goodsVolume = in.readString();
        this.actualDistance = in.readString();
        this.calculateType = in.readString();
//        this.selfPickUp = in.readString();
//        this.selfSend = in.readString();
        this.selfPickUpFreight = in.readString();
        this.selfSendFreight = in.readString();
        this.startProvince = in.readString();
        this.startCity = in.readString();
        this.startArea = in.readString();
        this.startAddress = in.readString();
        this.endProvince = in.readString();
        this.endCity = in.readString();
        this.endArea = in.readString();
        this.endAddress = in.readString();
        this.discountInfo = new ArrayList<String[]>();
        in.readList(this.discountInfo, String[].class.getClassLoader());
        this.baseFreight = in.readString();
        this.freight = in.readString();
    }

    public static final Creator<CalculateFreightBean> CREATOR = new Creator<CalculateFreightBean>() {
        @Override
        public CalculateFreightBean createFromParcel(Parcel source) {
            return new CalculateFreightBean(source);
        }

        @Override
        public CalculateFreightBean[] newArray(int size) {
            return new CalculateFreightBean[size];
        }
    };

    @Override
    public String toString() {
        return "CalculateFreightBean{" +
                "goodsWeight='" + goodsWeight + '\'' +
                ", goodsVolume='" + goodsVolume + '\'' +
                ", actualDistance='" + actualDistance + '\'' +
                ", calculateType='" + calculateType + '\'' +
//                ", selfPickUp='" + selfPickUp + '\'' +
//                ", selfSend='" + selfSend + '\'' +
                ", selfPickUpFreight='" + selfPickUpFreight + '\'' +
                ", selfSendFreight='" + selfSendFreight + '\'' +
                ", startProvince='" + startProvince + '\'' +
                ", startCity='" + startCity + '\'' +
                ", startArea='" + startArea + '\'' +
                ", startAddress='" + startAddress + '\'' +
                ", endProvince='" + endProvince + '\'' +
                ", endCity='" + endCity + '\'' +
                ", endArea='" + endArea + '\'' +
                ", endAddress='" + endAddress + '\'' +
                ", discountInfo=" + discountInfo +
                ", baseFreight='" + baseFreight + '\'' +
                ", freight='" + freight + '\'' +
                '}';
    }
}
